import request from '@/utils/request'

// 创建菜单
export const createMenu = (data) => {
  return request({
    url: '/api/v1/menu/create',
    method: 'post',
    data
  })
}

// 更新菜单
export const updateMenu = (data) => {
  return request({
    url: '/api/v1/menu/update',
    method: 'post',
    data
  })
}

// 删除菜单
export const deleteMenu = (params) => {
  return request({
    url: '/api/v1/menu/delete',
    method: 'get',
    params
  })
}

// 查询单个菜单
export const findOneMenu = (params) => {
  return request({
    url: '/api/v1/menu/findOne',
    method: 'get',
    params
  })
}

// 查询所有菜单
export const findAllMenu = (params) => {
  return request({
    url: '/api/v1/menu/findAll',
    method: 'get',
    params
  })
}

